package com.sinven.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Order entity. @author MyEclipse Persistence Tools
 */
/**
 * 李志伟
 * 反向生成
 */
@Entity
@Table(name = "nideshop_order", catalog = "csf")
public class Order implements java.io.Serializable {

    // Fields

    private Integer id;
    private Integer userId;
    private Integer orderStatus;
    private String consignee;
    private Double orderPrice;
    private Double goodsPrice;
    private Timestamp addTime;
    private Integer addressId;

    // Constructors

    /** default constructor */
    public Order() {
    }

    /** full constructor */
    public Order(Integer userId, Integer orderStatus, String consignee, Double orderPrice,
                         Double goodsPrice, Timestamp addTime,Integer addressId) {
        this.userId = userId;
        this.orderStatus = orderStatus;
        this.consignee = consignee;
        this.orderPrice = orderPrice;
        this.goodsPrice = goodsPrice;
        this.addTime = addTime;
        this.addressId=addressId;
    }

    // Property accessors
    @Id
    @GeneratedValue
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "user_id")
    public Integer getUserId() {
        return this.userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Column(name = "order_status")
    public Integer getOrderStatus() {
        return this.orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Column(name = "consignee", length = 60)
    public String getConsignee() {
        return this.consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    @Column(name = "order_price", precision = 10)
    public Double getOrderPrice() {
        return this.orderPrice;
    }

    public void setOrderPrice(Double orderPrice) {
        this.orderPrice = orderPrice;
    }

    @Column(name = "goods_price", precision = 10)
    public Double getGoodsPrice() {
        return this.goodsPrice;
    }

    public void setGoodsPrice(Double goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    @Column(name = "add_time", length = 0)
    public Timestamp getAddTime() {
        return this.addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }
    @Column(name = "address_id", length = 10)
    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }
}